using System;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using Microsoft.SharePoint;
using System.Linq;
using Microsoft.SharePoint.WebPartPages;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;

namespace SlamCms.SharePoint.Features.GlobalSettingsPages
{
	[Guid("1206f495-552c-47ba-834e-4c83d17d9ee6")]
	public class GlobalSettingsPagesEventReceiver : SPFeatureReceiver
	{	
		public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
		{
			base.FeatureDeactivating(properties);
		
			SPWeb web = (SPWeb)properties.Feature.Parent;
			web.AllowUnsafeUpdates = true;
			SPFile file = web.RootFolder.Files["Publishers.aspx"];
			file.Delete();

			file = web.RootFolder.Files["TagManager.aspx"];
			file.Delete();
		}
	}
}
